{extend name='admin@public/content'}

{block name="content"}
<form autocomplete="off" onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='form-horizontal layui-form padding-top-20'>

    <div class="form-group">
        <label class="col-sm-2 control-label">所属用户</label>
        <div class='col-sm-8'>
            <input disabled value="{:widget('Mkg/getUsername', ['id' => $vo.uid])}" class="layui-input">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">标题</label>
        <div class='col-sm-8'>
            <input name="title" value="{$vo.title}" class="layui-input">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">内容</label>
        <div class='col-sm-8'>
            <textarea class="layui-textarea" name="content">{$vo.content|default=""}</textarea>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="col-sm-7 col-sm-offset-2">
        <div class="layui-form-item text-center">
            {if !empty($vo.id)}<input type="hidden" name="id" value="{$vo.id}">{/if}
            <button class="layui-btn" type="submit">保存配置</button>
            <button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">返回</button>
        </div>
    </div>

    <script>window.form.render();</script>

    <script>
        /*! 实例富文本编辑器  */
        require(['ckeditor'], function () {
            window.createEditor('[name="content"]', {height: 500});
        });
    </script>
</form>
{/block}